//
//  YYERechargeMoneyTableViewCell.m
//  YuYingEDU
//
//  Created by 胡波 on 2018/1/5.
//  Copyright © 2018年 胡波. All rights reserved.
//

#import "YYERechargeMoneyTableViewCell.h"

@implementation YYERechargeMoneyTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.nameLabel = [[UILabel alloc]init];
        self.nameLabel.textColor = [UIColor blackColor];
        self.nameLabel.font = [UIFont systemFontOfSize:14];
        [self.contentView addSubview:self.nameLabel];
        
        self.moneyTF = [[UITextField alloc]init];
        self.moneyTF.textAlignment = NSTextAlignmentRight;
        [self.contentView addSubview:self.moneyTF];
        
    }
    return self;
    
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    [self.nameLabel makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView.left).offset(20);
        make.centerY.equalTo(self.contentView.centerY);
    }];
    
    [self.moneyTF makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView.left).offset(80);
        make.right.equalTo(self.contentView.right).offset(-20);
        make.centerY.equalTo(self.contentView.centerY);
        make.height.equalTo(30);
    }];
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
